package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.PowerUsedCostMapper;
import com.whq.entity.PowerUsedCost;
import com.whq.service.PowerUsedCostService;

@Service(value = "tdPowerUsedCostService")
public class PowerUsedCostServiceImpl implements PowerUsedCostService {

    @Autowired
    private PowerUsedCostMapper<PowerUsedCost>tdPowerUsedCostMapper;
    
    @Override
    public Integer insertSelective(PowerUsedCost tdPowerUsedCost) throws Exception {
           return this.tdPowerUsedCostMapper.insertSelective(tdPowerUsedCost);
        }

    @Override
    public Integer insertBatch(List<PowerUsedCost> tdPowerUsedCost) throws Exception {
           return this.tdPowerUsedCostMapper.insertBatch(tdPowerUsedCost) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tdPowerUsedCostMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tdPowerUsedCostMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(PowerUsedCost tdPowerUsedCost) {
           return this.tdPowerUsedCostMapper.updateByPrimaryKeySelective(tdPowerUsedCost);
    }

    @Override
    public PowerUsedCost findById(Object id) {
           return (PowerUsedCost) this.tdPowerUsedCostMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<PowerUsedCost> selectByCondition(PowerUsedCost tdPowerUsedCost) {
           return (List<PowerUsedCost>) this.tdPowerUsedCostMapper.selectByCondition(tdPowerUsedCost);
    }

    @Override
    public Integer selectCountByCondition(PowerUsedCost tdPowerUsedCost) {
           return  this.tdPowerUsedCostMapper.selectCountByCondition(tdPowerUsedCost);
    }

}
